/**
 * 
 */
package client;

import java.net.MalformedURLException;
import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

import cc.rico.webservice.server.HelloWorld;

/**
 * @author rico
 *
 */
public class HelloWorldClient {

	/**
	 * @param args
	 * @throws MalformedURLException 
	 */
	public static void main(String[] args) throws MalformedURLException {
		URL url = new URL("http://localhost:8089/ws/hello?wsdl");
		
		//QName qName = new QName("http://ws.rico.cc/", "HelloWorldImplService");
		//QName qName = new QName("http://server.webservice.rico.cc/", "HelloWorldImplService");
		
		// targetNamespace="http://ws.rico.cc", portName="HelloWorldService"
		QName qName = new QName("http://ws.rico.cc/", "HelloWorldService");
		
		Service service = Service.create(url, qName);
		HelloWorld hw = service.getPort(HelloWorld.class);
		System.out.println(hw.getHelloWorldAsString("admin"));
	}

}
